package com.handsome.controller;

import com.handsome.service.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class MainController extends BaseController {

    @Autowired
    private AuthService authService;


    @RequestMapping("/main")
    public String main(Model model) {

        model.addAttribute("menus", authService.getMenus(true));

        return "main";
    }

    @RequestMapping("/main/index")
    public String index() {
        return "main/index";

    }
}
